package com.ruoyi.xz.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xz.mapper.LaptopFamilyMapper;
import com.ruoyi.xz.domain.LaptopFamily;
import com.ruoyi.xz.service.ILaptopFamilyService;

/**
 * 商品分类Service业务层处理
 * 
 * @author DongNan
 * @date 2024-06-27
 */
@Service
public class LaptopFamilyServiceImpl implements ILaptopFamilyService 
{
    @Autowired
    private LaptopFamilyMapper laptopFamilyMapper;

    /**
     * 查询商品分类
     * 
     * @param id 商品分类主键
     * @return 商品分类
     */
    @Override
    public LaptopFamily selectLaptopFamilyById(Long id)
    {
        return laptopFamilyMapper.selectLaptopFamilyById(id);
    }

    /**
     * 查询商品分类列表
     * 
     * @param laptopFamily 商品分类
     * @return 商品分类
     */
    @Override
    public List<LaptopFamily> selectLaptopFamilyList(LaptopFamily laptopFamily)
    {
        return laptopFamilyMapper.selectLaptopFamilyList(laptopFamily);
    }

    /**
     * 新增商品分类
     * 
     * @param laptopFamily 商品分类
     * @return 结果
     */
    @Override
    public int insertLaptopFamily(LaptopFamily laptopFamily)
    {
        return laptopFamilyMapper.insertLaptopFamily(laptopFamily);
    }

    /**
     * 修改商品分类
     * 
     * @param laptopFamily 商品分类
     * @return 结果
     */
    @Override
    public int updateLaptopFamily(LaptopFamily laptopFamily)
    {
        return laptopFamilyMapper.updateLaptopFamily(laptopFamily);
    }

    /**
     * 批量删除商品分类
     * 
     * @param ids 需要删除的商品分类主键
     * @return 结果
     */
    @Override
    public int deleteLaptopFamilyByIds(Long[] ids)
    {
        return laptopFamilyMapper.deleteLaptopFamilyByIds(ids);
    }

    /**
     * 删除商品分类信息
     * 
     * @param id 商品分类主键
     * @return 结果
     */
    @Override
    public int deleteLaptopFamilyById(Long id)
    {
        return laptopFamilyMapper.deleteLaptopFamilyById(id);
    }
}
